Template Conditionals |
Top Previous Next |
Template Conditionals are outlined blocks of HTML code that will be included depending on a corresponding condition. Template Conditionals always have a beginning and en ending, just like normal HTML tags. The format is:
%ConditionName Any HTML code here . . %/ConditionName
Notice how a condition starts with %Name and ends with %/Name (a slash after the percent)
For example; letÆs say you want to include some HTML code when there is EXIF information available for the generated photo. This is done by using the Template Conditional %EXIFExists and is closed by %/EXIFExists.
Many template conditionals also have a negative counterpart. The counterpart of %EXIFExists (and %/EXIFExists) is %NotEXIFExists (and %/NotEXIFExists).
Example: <b>Photo %ImageName</b> <p> %EXIFExists <u>This photo contains Exif information</u>: <br> Short Exif info: %ImageEXIF<br> F-Number: %exif:Fnumber<br> Exposure Mode: %exif:ExposureMode<br> %/EXIFExists
%NotEXIFExists <i>no EXIF information available for this photo.</i> %/NotEXIFExists </p>
|